package com.easyoffer.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.easyoffer.common.BaseResponse;
import com.easyoffer.common.DeleteRequest;
import com.easyoffer.model.dto.question.QuestionAddRequst;
import com.easyoffer.model.dto.question.QuestionQueryRequest;
import com.easyoffer.model.dto.question.QuestionUpdateRequest;
import com.easyoffer.model.entity.Question;
import com.baomidou.mybatisplus.extension.service.IService;
import com.easyoffer.model.vo.QuestionVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author 何文斌
* @description 针对表【question(题目)】的数据库操作Service
* @createDate 2025-03-15 21:09:28
*/
public interface QuestionService extends IService<Question> {

    BaseResponse<Long> addQuestion(QuestionAddRequst questionAddRequst, HttpServletRequest request);

    BaseResponse<Integer> updateQuestion(QuestionUpdateRequest updateRequest, HttpServletRequest request);

    BaseResponse<Boolean> deleteQuestion(DeleteRequest deleteId, HttpServletRequest request);

    Page<QuestionVO> listQuestionByPage(QuestionQueryRequest questionQueryRequest);

    Page<QuestionVO> searchQuestionFromEs(QuestionQueryRequest queryRequest, HttpServletRequest request);


    void batchDeleteQuestions(List<Long> questionIdList);

    QuestionVO getQuestion(Long id, HttpServletRequest request);
}
